#ifndef APPGREPORT_H
#define APPGREPORT_H

#include <QWidget>
#include "Beans/databeans.h"
#include <QtCharts>
#include "qchart.h"
#include <QtCharts/QChartView>
#include <QtCharts/QPieSeries>
#include <QtCharts/QPieSlice>
#include <QtCharts/QAbstractBarSeries>
#include <QtCharts/QPercentBarSeries>
#include <QtCharts/QStackedBarSeries>
#include <QtCharts/QBarSeries>
#include <QtCharts/QBarSet>
#include <QtCharts/QLineSeries>
#include <QtCharts/QSplineSeries>
#include <QtCharts/QScatterSeries>
#include <QtCharts/QAreaSeries>
#include <QtCharts/QLegend>
#include <QtCharts/QBarCategoryAxis>
#include <QtCharts/QValueAxis>
#include <QtCharts/QChartGlobal>
namespace Ui {
class APPGReport;
}

class APPGReport : public QWidget
{
    Q_OBJECT

public:
    explicit APPGReport(QWidget *parent = nullptr);
    ~APPGReport();
    void setValue(DataBeans db);


private:
    Ui::APPGReport *ui;
    int getIndexLen(QList<double>ranger, double indexv,bool flag);
    QChart *CreateLineChart_PPG();
    QChart *CreateLineChart_APPG();
    void setPPGData(QList<double>ppg);
    void setAPPGData(QList<double>appg);

    QChart *chart_ppg,*chart_Appg;
    QLineSeries *Series_ppg,*Series_Appg;
    QValueAxis *xAxis_ppg,*xAxis_appg;
    QValueAxis *yAxis_ppg,*yAxis_appg;
    void InitialAxis_Chart_PPG(QList<double>ppg);
    void InitialAxis_Chart_APPG(QList<double>appg);
};

#endif // APPGREPORT_H
